package cn.com.headfree.vo.simple;

import cn.com.headfree.util.SysDictionaryUtil;
import com.deepoove.poi.data.DocxRenderData;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang.StringUtils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class TecInnovInfoVo {

    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    /**
     * QC成果名称
     */
    private String achiName;
    /**
     * 内容摘要
     */
    private String sumary;
    /**
     * 获奖名称
     */
    private String awardName;
    /**
     * 获奖日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date awardDate;

    private String awardDateStr;

    /**
     * QC奖项授予单位
     */
    private String awardOrg;
    /**
     * QC获奖级别
     */
    private String awardLevel;
    /**
     * 奖项等级
     */
    private String awardGrade;
    /**
     * QC小组名称
     */
    private String groupName;
    /**
     * QC小组成员姓名
     */
    private String memberName;
    /**
     * 创建者id
     */
    private String createrId;
    /**
     * 创建者姓名
     */
    private String createrName;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    private String createTimeStr;

    /**
     * 更新者id
     */
    private String updaterId;
    /**
     * 更新者姓名
     */
    private String updaterName;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;
    /**
     * 0:未删除1：已删除
     */
    private Integer delSign;
    /**
     * 是否有效数据(0:有效，1:无效)
     */
    private Integer isValid;
    /**
     * 审核状态
     */
    private Integer auditState;

    private String role;

    private String erpNo;

    private String userName;

    private Integer rank;

    private String id;

    private DocxRenderData tecInnovPersonEx;

    public DocxRenderData getTecInnovPersonEx() {
        return tecInnovPersonEx;
    }

    public void setTecInnovPersonEx(DocxRenderData tecInnovPersonEx) {
        this.tecInnovPersonEx = tecInnovPersonEx;
    }

    public String getAwardDateStr() {
        return awardDateStr;
    }

    public void setAwardDateStr(String awardDateStr) {
        if (StringUtils.isNotBlank(awardDateStr)) {
            this.awardDateStr = awardDateStr.substring(0,7);
        } else {
            this.awardDateStr = awardDateStr;
        }
    }

    public String getCreateTimeStr() {
        return createTimeStr;
    }

    public void setCreateTimeStr(String createTimeStr) {
        this.createTimeStr = createTimeStr;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAchiName() {
        return achiName;
    }

    public void setAchiName(String achiName) {
        this.achiName = achiName;
    }

    public String getSumary() {
        return sumary;
    }

    public void setSumary(String sumary) {
        this.sumary = sumary;
    }

    public String getAwardName() {
        return awardName;
    }

    public void setAwardName(String awardName) {
        this.awardName = awardName;
    }

    public Date getAwardDate() {
        return awardDate;
    }

    public void setAwardDate(Date awardDate) {
        this.awardDate = awardDate;
        if (awardDate!=null){
            this.awardDateStr=sdf.format(awardDate).split(" ")[0];
        }
    }

    public String getAwardOrg() {
        return awardOrg;
    }

    public void setAwardOrg(String awardOrg) {
        this.awardOrg = awardOrg;
    }

    public String getAwardLevel() {
        return awardLevel;
    }

    public void setAwardLevel(String awardLevel) {
        this.awardLevel = awardLevel;
//        this.awardLevel = SysDictionaryUtil.getNameByValue("JygexinQcJb",awardLevel);;
    }

    public String getAwardGrade() {
        return awardGrade;
    }

    public void setAwardGrade(String awardGrade) {
        this.awardGrade = awardGrade;
//        this.awardGrade = SysDictionaryUtil.getNameByValue("JygexinQcDj",awardGrade);;;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public String getCreaterId() {
        return createrId;
    }

    public void setCreaterId(String createrId) {
        this.createrId = createrId;
    }

    public String getCreaterName() {
        return createrName;
    }

    public void setCreaterName(String createrName) {
        this.createrName = createrName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
        if (createTime!=null){
            this.createTimeStr=sdf.format(createTime).split(" ")[0];
        }
    }

    public String getUpdaterId() {
        return updaterId;
    }

    public void setUpdaterId(String updaterId) {
        this.updaterId = updaterId;
    }

    public String getUpdaterName() {
        return updaterName;
    }

    public void setUpdaterName(String updaterName) {
        this.updaterName = updaterName;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDelSign() {
        return delSign;
    }

    public void setDelSign(Integer delSign) {
        this.delSign = delSign;
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public Integer getAuditState() {
        return auditState;
    }

    public void setAuditState(Integer auditState) {
        this.auditState = auditState;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getErpNo() {
        return erpNo;
    }

    public void setErpNo(String erpNo) {
        this.erpNo = erpNo;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getRank() {
        return rank;
    }

    public void setRank(Integer rank) {
        this.rank = rank;
    }
}
